/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
#ifndef MATERIAL_H
#define MATERIAL_H

#include <cstdlib>

#include "ode/ode.h"


/*
* Defines the graphical look of an object or material
* TODO: add features like shininess and maybe even textures (texture feature
  requires changes to drawing functions)
*/
struct TOGLMaterial
{
  float color[3];

};

static const TOGLMaterial DEFAULT_LOOK={
                                        {0.8,0.8,0.8} //color
                                      };

static const dSurfaceParameters DEFAULT_SURFACE={ dContactSoftCFM,//mode;
                                            10.0,//dInfinity,//mu;
                                            0.0,        //mu2;
                                            0.0,      //bounce;
                                            0.0,        //bounce_vel;
                                            0.8,        //soft_erp;
                                            1e-4,     //soft_cfm
                                            0.0,0.0,      //motion1,motion2
                                            0.0,0.0      //slip1,slip2;
                                          };

static const dReal DEFAULT_DENSITY=1000.0;

/*
* Defines the physical features of an object
*/
struct TMaterial
{
  TMaterial()
  :surface(DEFAULT_SURFACE),
  density(DEFAULT_DENSITY),
  look(DEFAULT_LOOK)
  {
  }

  TMaterial(dSurfaceParameters surface, dReal density, TOGLMaterial look)
  :surface(surface),
  density(density),
  look(look)
  {
  }

  dSurfaceParameters surface;
  dReal density;
  TOGLMaterial look;
};

static const TMaterial DEFAULT_MATERIAL;/*={
                                          DEFAULT_SURFACE,
                                          DEFAULT_DENSITY, //density
                                          DEFAULT_LOOK //color
                                        };*/

#endif //MATERIAL_H
